package com.sc.nft.service;

import com.sc.nft.entity.Order;
import com.sc.nft.entity.SecondEquityPropsOrder;
import com.sc.nft.entity.SecondOrder;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 用户业绩表服务接口
 *
 * @author zxy
 * @description 用户市值
 * @since 2023-07-20 17:29:27
 */
public interface UserPerformanceService {

    /**
     * 获取用户近XX天业绩
     *
     * @param userId
     * @param nearDays
     * @return
     */
    BigDecimal getPerformanceNearDate(Long userId, int nearDays,boolean isCenter);


    /**
     * 计算一级订单业绩
     *
     * @param order
     * @param termUser
     */
    void calFirstOrder(Order order,String recordDate, Map<Long, Integer> termUser);

    /**
     * 计算二级订单业绩
     *
     * @param order
     * @param termUser
     */
    void calSecondOrder(SecondOrder order,String recordDate, Map<Long, Integer> termUser);

}
